FROM registry.cn-hangzhou.aliyuncs.com/jetlinks2/zlmedia as builder

# 设置时区
ENV TZ=Asia/Shanghai
ENV SERVERID=$SERVERID
ENV TRACE_TYPE=$TRACE_TYPE
ENV SERVICE=$SERVICE
ENV POD_NUM=$POD_NUM
ENV PORT=$PORT
ENV WEBHOOK=$WEBHOOK

ENV LOG_LEVEL=4
# 默认的环境
ARG DEFAULT_APP_ENV="default"
# 指定的环境
ENV APP_ENV=$DEFAULT_APP_ENV

COPY config /config
WORKDIR /opt/media/bin
COPY ./config/docker-entrypoint.sh docker-entrypoint.sh


RUN chmod +x docker-entrypoint.sh

ENTRYPOINT ["sh","docker-entrypoint.sh"]

CMD ["./MediaServer","-l","$LOG_LEVEL"]

